<template>
  <div>
    <h1>App</h1>
    <button @click="Comp = 'News'">新闻</button>
    <button @click="Comp = 'Music'">音乐</button>
    <button @click="Comp = 'Play'">娱乐</button>
    <component :is="Comp" />
  </div>
</template>

<script>
import Music from "@/components/Music";
import News from "@/components/News";
import Play from "@/components/Play";
export default {
  name: "App",
  components: {
    Music,
    News,
    Play,
  },
  data() {
    return {
      Comp: "",
    };
  },
};
</script>

<style></style>
